#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
2 #include <unistd.h>
3 #include <sys/types.h>
4
5 int main()
6 {
    7     pid_t pid = getpid();
    8     while (1)
        9     {
        W > 10         FILE * fp = fopen("test.txt", "w");
        11         printf("I am a process,pid:%d\n", pid);
        12         sleep(1);
        13     }
    14
        15     return 0;
    16 }
